
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-nodejs"></use>
                    </svg>
                    <div class="name">nodejs</div>
                    <div class="fontclass">#icon-nodejs</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-github"></use>
                    </svg>
                    <div class="name">github</div>
                    <div class="fontclass">#icon-github</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-edit"></use>
                    </svg>
                    <div class="name">编辑</div>
                    <div class="fontclass">#icon-edit</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sousuo"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-sousuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-moban1qiuzhiyixiang01"></use>
                    </svg>
                    <div class="name">纸飞机</div>
                    <div class="fontclass">#icon-moban1qiuzhiyixiang01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-h5"></use>
                    </svg>
                    <div class="name">H5</div>
                    <div class="fontclass">#icon-h5</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qiyeguanxitupu"></use>
                    </svg>
                    <div class="name">企业关系图谱</div>
                    <div class="fontclass">#icon-qiyeguanxitupu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sousuo1"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-sousuo1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-unie63d"></use>
                    </svg>
                    <div class="name">叶子</div>
                    <div class="fontclass">#icon-unie63d</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bianji"></use>
                    </svg>
                    <div class="name">bianji</div>
                    <div class="fontclass">#icon-bianji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-i2"></use>
                    </svg>
                    <div class="name">i2</div>
                    <div class="fontclass">#icon-i2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-svg1160608easyiconnet"></use>
                    </svg>
                    <div class="name">svg</div>
                    <div class="fontclass">#icon-svg1160608easyiconnet</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cloud"></use>
                    </svg>
                    <div class="name">cloud</div>
                    <div class="fontclass">#icon-cloud</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qishihorseman1"></use>
                    </svg>
                    <div class="name">胡子</div>
                    <div class="fontclass">#icon-qishihorseman1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-font-awesome"></use>
                    </svg>
                    <div class="name">font-awesome</div>
                    <div class="fontclass">#icon-font-awesome</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-echart"></use>
                    </svg>
                    <div class="name">echart</div>
                    <div class="fontclass">#icon-echart</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lodash"></use>
                    </svg>
                    <div class="name">lodash</div>
                    <div class="fontclass">#icon-lodash</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bootstrap"></use>
                    </svg>
                    <div class="name">bootstrap</div>
                    <div class="fontclass">#icon-bootstrap</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sass"></use>
                    </svg>
                    <div class="name">sass</div>
                    <div class="fontclass">#icon-sass</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-less"></use>
                    </svg>
                    <div class="name">less</div>
                    <div class="fontclass">#icon-less</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gulp"></use>
                    </svg>
                    <div class="name">gulp</div>
                    <div class="fontclass">#icon-gulp</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-D"></use>
                    </svg>
                    <div class="name">D3</div>
                    <div class="fontclass">#icon-D</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ThreeJs"></use>
                    </svg>
                    <div class="name">ThreeJs</div>
                    <div class="fontclass">#icon-ThreeJs</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ziyuan"></use>
                    </svg>
                    <div class="name">svg</div>
                    <div class="fontclass">#icon-ziyuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-css"></use>
                    </svg>
                    <div class="name">css3</div>
                    <div class="fontclass">#icon-css</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sousuo2"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-sousuo2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-vuejs"></use>
                    </svg>
                    <div class="name">vue</div>
                    <div class="fontclass">#icon-vuejs</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-eleme"></use>
                    </svg>
                    <div class="name">eleme</div>
                    <div class="fontclass">#icon-eleme</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baiduditu"></use>
                    </svg>
                    <div class="name">百度地图</div>
                    <div class="fontclass">#icon-baiduditu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-angularjs"></use>
                    </svg>
                    <div class="name">angularjs</div>
                    <div class="fontclass">#icon-angularjs</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-git"></use>
                    </svg>
                    <div class="name">git</div>
                    <div class="fontclass">#icon-git</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-element"></use>
                    </svg>
                    <div class="name">element</div>
                    <div class="fontclass">#icon-element</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jquery"></use>
                    </svg>
                    <div class="name">jquery</div>
                    <div class="fontclass">#icon-jquery</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-github1"></use>
                    </svg>
                    <div class="name">github</div>
                    <div class="fontclass">#icon-github1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-webpack"></use>
                    </svg>
                    <div class="name">webpack</div>
                    <div class="fontclass">#icon-webpack</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-changjing"></use>
                    </svg>
                    <div class="name">场景</div>
                    <div class="fontclass">#icon-changjing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-layer"></use>
                    </svg>
                    <div class="name">layer</div>
                    <div class="fontclass">#icon-layer</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-html"></use>
                    </svg>
                    <div class="name">html5</div>
                    <div class="fontclass">#icon-html</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yezi"></use>
                    </svg>
                    <div class="name">叶子</div>
                    <div class="fontclass">#icon-yezi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-react"></use>
                    </svg>
                    <div class="name">react</div>
                    <div class="fontclass">#icon-react</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qiyetupu"></use>
                    </svg>
                    <div class="name">企业图谱</div>
                    <div class="fontclass">#icon-qiyetupu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-angularjs1"></use>
                    </svg>
                    <div class="name">angularjs</div>
                    <div class="fontclass">#icon-angularjs1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-nodejs1"></use>
                    </svg>
                    <div class="name">nodejs</div>
                    <div class="fontclass">#icon-nodejs1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-webpack1"></use>
                    </svg>
                    <div class="name">webpack</div>
                    <div class="fontclass">#icon-webpack1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cms"></use>
                    </svg>
                    <div class="name">cms</div>
                    <div class="fontclass">#icon-cms</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-WebGL"></use>
                    </svg>
                    <div class="name">WebGL</div>
                    <div class="fontclass">#icon-WebGL</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sousuo3"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-sousuo3</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
